package org.cbg.until;

import java.awt.Image;

import javax.swing.ImageIcon;

/**
 * 图片自适应大小
 * @author Administrator
 *
 */
public class TraslationImageIconZishiying {
	
	/**
	 * 图片自适应大小
	 * @author Administrator
	 *
	 */
	public static ImageIcon xiugaitupainSize(ImageIcon img ,int width , int hight ){
		img.setImage(img.getImage().getScaledInstance(width, hight, Image.SCALE_DEFAULT));
		return img;
	}
	

}
